<template>
    <div>
        <el-dialog
                title="GS001盘点 某某仓位"
                :visible.sync="dialogshow"
                :before-close="dialogClose"
                style="display: none"
                top="10vh"
                width="90%"
                :fullscreen="fullscreen"
        >
            <dialog-tools
                    v-bind:back="true"
                    v-bind:next="true"
                    v-bind:goback="true"
                    v-bind:prev="true"
                    v-bind:screen="true"
                    @clickfullscreen="clickfullscreen"
            >
            </dialog-tools>

            <el-tabs
                    class="tabs-table product-tabs"
                    type="border-card"
            >
                <el-tab-pane label="盘点">


                    <el-form
                            id="form-baoji"
                            size="mini"
                            :model="formData"
                            label-width="100px"
                            label-position="top"
                            :inline="true"
                    >

                    <el-table
                            v-if="showTableZs"
                            ref="multipleTable"
                            stripe
                            :data="tableDataZs"
                            :show-summary="false"
                            border
                            show-summary
                            row-class-name="tableRow"
                            header-row-class-name="tableHeader"
                            :highlight-current-row="true"
                            style="width: 100%; border-top: 1px solid #c5c5c5"
                    >
                        <el-table-column
                                type="selection"
                                width="55">
                        </el-table-column>
                        <el-table-column
                                prop="id"
                                label="序号"
                                width="50"
                        ></el-table-column>
                        <el-table-column
                                prop="name"
                                label="物品"
                                sortable
                        ></el-table-column>
                        <el-table-column  label="是否盘点">
                            未盘点
                        </el-table-column>
                        <el-table-column prop="smjz" label="上期存">
                        </el-table-column>
                        <el-table-column prop="ct" label="应存"></el-table-column>

                        <el-table-column label="现存">
                            <el-input
                                    auto-complete="off"

                            ></el-input>
                        </el-table-column>
                        <el-table-column
                                prop="number"
                                label="差值"
                                width="50"
                        ></el-table-column>


                    </el-table>

                    </el-form>

                </el-tab-pane>
                <el-tab-pane label="出库记录">
                    <el-table
                            v-if="showTableZs"
                            ref="multipleTable"
                            stripe
                            :data="tableDataZs"
                            :show-summary="false"
                            border
                            show-summary
                            row-class-name="tableRow"
                            header-row-class-name="tableHeader"
                            :highlight-current-row="true"
                            style="width: 100%; border-top: 1px solid #c5c5c5"
                    >
                        <el-table-column
                                type="selection"
                                width="55">
                        </el-table-column>
                        <el-table-column
                                prop="id"
                                label="序号"
                                width="50"
                        ></el-table-column>
                        <el-table-column
                                prop="name"
                                label="物品"
                                sortable
                        ></el-table-column>
                        <el-table-column prop="smjz" label="发出人">
                        </el-table-column>
                        <el-table-column prop="ct" label="接受人"></el-table-column>

                        <el-table-column prop="ct"  label="数量/重量">
                        </el-table-column>

                        <el-table-column
                                prop="number"
                                label="时间"
                                width="50"
                        ></el-table-column>

                        <el-table-column prop="ct"  label="备注">
                        </el-table-column>


                    </el-table>
                </el-tab-pane>
                <el-tab-pane label="入库记录">
                    <el-table
                            v-if="showTableZs"
                            ref="multipleTable"
                            stripe
                            :data="tableDataZs"
                            :show-summary="false"
                            border
                            show-summary
                            row-class-name="tableRow"
                            header-row-class-name="tableHeader"
                            :highlight-current-row="true"
                            style="width: 100%; border-top: 1px solid #c5c5c5"
                    >
                        <el-table-column
                                type="selection"
                                width="55">
                        </el-table-column>
                        <el-table-column
                                prop="id"
                                label="序号"
                                width="50"
                        ></el-table-column>
                        <el-table-column
                                prop="name"
                                label="物品"
                                sortable
                        ></el-table-column>
                        <el-table-column prop="smjz" label="发出人">
                        </el-table-column>
                        <el-table-column prop="ct" label="接受人"></el-table-column>

                        <el-table-column prop="ct"  label="数量/重量">
                        </el-table-column>

                        <el-table-column
                                prop="number"
                                label="时间"
                                width="50"
                        ></el-table-column>

                        <el-table-column prop="ct"  label="备注">
                        </el-table-column>


                    </el-table>
                </el-tab-pane>
            </el-tabs>


            <el-dialog
                    width="30%"
                    title="产品大图"
                    :visible.sync="innerVisible"
                    append-to-body>
                <carousel></carousel>
            </el-dialog>

            <div slot="footer" class="dialog-footer">
<!--                <el-dropdown style="float:left;margin-left: 15px">-->
<!--                    <el-button>-->
<!--                        关联数据<i class="el-icon-arrow-down el-icon&#45;&#45;right"></i>-->
<!--                    </el-button>-->
<!--                    <el-dropdown-menu slot="dropdown">-->
<!--                        <el-dropdown-item>出货结算</el-dropdown-item>-->
<!--                        <el-dropdown-item>设计图</el-dropdown-item>-->
<!--                        <el-dropdown-item>客来石</el-dropdown-item>-->
<!--                        <el-dropdown-item>客来金</el-dropdown-item>-->
<!--                        <el-dropdown-item>其它...</el-dropdown-item>-->
<!--                    </el-dropdown-menu>-->
<!--                </el-dropdown>-->

<!--                <el-button style="float:left;margin-left: 15px" @click="innerVisible=true">查看大图</el-button>-->
                <!-- <el-button type="primary" @click="dialogGenjiAdd=true">继续跟进</el-button> -->
                <el-button @click="dialogClose">关闭</el-button>
<!--                <el-button type="primary" @click="dialogAdd=true">修改</el-button>-->
                <el-button type="primary" @click="dialogClose">确定</el-button>
            </div>
        </el-dialog>
        <caozuojilu-list
                v-bind:dialogshow="dialogCustomerEdit"
                @dialog_close="dialog_close_customer_edit"
        ></caozuojilu-list>

        <dialog-add
                v-bind:dialogshow="dialogAdd"
                @dialog_close="dialog_close_customer_add"
        ></dialog-add>
    </div>
</template>
<style scoped>
    .product-tabs .el-row {
        margin-top: 10px;
        margin-bottom: 10px;
    }

    .product-tabs .el-divider--horizontal {
        margin-top: 0px;
        margin-bottom: 10px;
    }

    .el-tab-pane {

        padding-bottom: 20px;
    }

    .span-lable,
    .span-info {
        display: inline-table;
        vertical-align: -webkit-baseline-middle;
    }

    .span-lable {
        text-align: right;
        width: 120px;
    }

    .span-info {
        margin-left: 20px;
    }

    .tabs-table td {
        height: 50px;
        border-bottom: 1px solid #dcdfe6;
    }

    .customer-tabs .el-tab-pane {
        height: 400px;
        overflow: auto;
        padding: 20px;
    }

</style>
<script>
  module.exports = {
    methods: {
      dialogAdd () {
        this.$confirm('是否继续操作?', '提示', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning',
        })
          .then(() => {
            this.$message({
              type: 'success',
              message: '操作成功!',
            })
          })
          .catch(() => {
            this.$message({
              type: 'info',
              message: '已取消',
            })
          })
      },
      dialogClose () {
        this.$emit('dialog_close', 1)
      },
      clickfullscreen () {
        this.fullscreen = !this.fullscreen
      },
      //跟进
      dialog_close_genjin_add (val) {
        console.log(val)
        this.dialogGenjiAdd = false
      },
      //跟进
      dialog_close_customer_edit (val) {
        console.log(val)
        this.dialogCustomerEdit = false
      },
      //跟进
      dialog_close_customer_add (val) {
        console.log(val)
        this.dialogAdd = false
      },
      handleButtons (val) {
        console.log(2222)
        switch (val) {
          case 1:
            this.dialogSendMessage = 'true'
            console.log(this.dialogSendMessage)
            break

          case 10:
            console.log(333)
            this.dialogCustomerInfo = 'false'
            this.dialogGenjiAdd = 'true'
            console.log(this.dialogGenjiAdd)
            break
          case 100:
            this.$confirm('是否申请物品待处理?', '提示', {
              confirmButtonText: '确定',
              cancelButtonText: '取消',
              type: 'warning',
            })
              .then(() => {
                this.$message({
                  type: 'success',
                  message: '操作成功!',
                })
              })
              .catch(() => {
                this.$message({
                  type: 'info',
                  message: '已取消',
                })
              })
            break
        }
      },
    },
    props: ['dialogshow'],
    data () {
      return {
        dialogAdd:false,
        innerVisible:false,
        showTableZs: true,
        showTableFs: true,
        showTableJs: true,
        showTablePj: true,
        activeName: 'first',
        dialogSendMessage: false,
        dialogCustomerInfo: false,
        dialogGenjiAdd: false,
        // dialogshow:false,
        Sendmssages: {
          address: '',
          customercate: '',
          cate: '',
          nickname: '',
          creditrank: '',
          name: '',
        },
        customer: {
          name: '',
          customercode: '',
          customerstatus: '',
          customercate: '',
          creditrank: '',
          creditline: '',
          capital: '',
          annualsales: '',
          bank: '',
          certificateno: '',
          address: '',
          area: '',
          brand: '',
          bankaccount: '',
          trademark: '',
          website: '',
          lperson: '',
          lphone: '',
          contacts: '',

          phone: '',
          phonenum: '',
          weixin: '',
          email: '',
          fax: '',
          resource: '',
          requirement: '',
          ordercountmonth: '',
          purchaseamountmonth: '',
          ordercountyear: '',
          purchaseamountyear: '',
          customerstaffname: '',
          customerstaffcode: '',
          operator: '',
          insertime: '',
          remark: '',
        },
        tableDataZs: [
          {
            id: '1',
            name: '钻石',
            smjz: '20000',
            number: '0',
            ys: 'D',
            jd: 'FL',
            ct: '1231',
            xz: '公主方',
            qg: '完美',
            kfgh: '否',
            xsfdj: '100',
            xsfzj: '100',
            zsdj: '10000',
            zszj: '20000',
            price_sum: '10000',
          },
          {
            id: '2',
            name: 'K金',
            smjz: '121 g',
            number: '0',
            ys: 'D',
            jd: 'FL',
            ct: '22 g',
            xz: '圆形',
            qg: '一般',
            kfgh: '是',
            xsfdj: '100',
            xsfzj: '100',
            zsdj: '10000',
            zszj: '20000',
            price_sum: '10000',
          },
          {
            id: '3',
            name: '钻石',
            smjz: '50000',
            number: '0',
            ys: 'D',
            jd: 'FL',
            ct: '1231',
            xz: '公主方',
            qg: '完美',
            kfgh: '是',
            xsfdj: '100',
            xsfzj: '100',
            zsdj: '10000',
            zszj: '20000',
            price_sum: '10000',
          },
          {
            id: '4',
            name: '钻石',
            smjz: '20000',
            number: '0',
            ys: 'D',
            jd: 'FL',
            ct: '1231',
            xz: '公主方',
            qg: '完美',
            kfgh: '是',
            xsfdj: '100',
            xsfzj: '100',
            zsdj: '10000',
            zszj: '20000',
            price_sum: '10000',
          },
        ],
        tableDataFs: [
          {
            id: '1',
            name: '钻石',
            smjz: '20000',
            number: '0',
            ys: 'D',
            jd: 'FL',
            ct: '1231',
            xz: '公主方',
            qg: '完美',
            kfgh: '否',
            psf: '120',
            xsfdj: '100',
            xsfzj: '100',
            zsdj: '10000',
            zszj: '20000',
            price_sum: '10000',
          },
          {
            id: '2',
            name: '红宝石',
            smjz: '40000',
            number: '0',
            ys: 'D',
            jd: 'FL',
            ct: '5.005',
            xz: '圆形',
            qg: '一般',
            kfgh: '是',
            psf: '120',
            xsfdj: '100',
            xsfzj: '100',
            zsdj: '10000',
            zszj: '20000',
            price_sum: '10000',
          },
          {
            id: '3',
            name: '钻石',
            smjz: '50000',
            number: '0',
            ys: 'D',
            jd: 'FL',
            ct: '1',
            xz: '公主方',
            qg: '完美',
            kfgh: '是',
            psf: '130',
            xsfdj: '100',
            xsfzj: '100',
            zsdj: '10000',
            zszj: '20000',
            price_sum: '10000',
          },
          {
            id: '4',
            name: '钻石',
            smjz: '20000',
            number: '1',
            ys: 'D',
            jd: 'FL',
            ct: '1231',
            xz: '公主方',
            qg: '完美',
            kfgh: '是',
            psf: '150',
            xsfdj: '100',
            xsfzj: '100',
            zsdj: '10000',
            zszj: '20000',
            price_sum: '10000',
          },
        ],
        fieldGgccOptions2: [
          {
            label: '仓库A',
            value: 1,
            id: 101,
            children: [
              {
                label: '2-4-1',
                value: '46mm',
                id: 108,
              },
              {
                label: '2-4-2',
                value: '47.5mm',
                id: 107,
              },
              {
                label: '2-4-3',
                value: '48mm',
                id: 106,
              },
              {
                label: '2-4-4',
                value: '50.5mm',
                id: 109,
              },
            ],
          },
          {
            label: '仓库B',
            value: '2',
            id: 110,
            children: [
              {
                label: '3-2-3',
                value: 'PT9991',
                id: 111,
              },
              {
                label: '3-2-4',
                value: 'PT9901',
                id: 112,
              },
            ],
          },
        ],
        tableDataJs: [
          {
            id: '1',
            name: '黄金',
            kfgh: '否',
            cs: '99%',
            ys: '黄',
            jjz: '121',
            ssjj: '10000',
            shl: '3',
            lhz: '4',
            gjszj: '20000',
            price_sum: '10000',
          },
          {
            id: '2',
            name: '铂金',
            kfgh: '是',
            cs: '99%',
            ys: '白',
            jjz: '1231',
            ssjj: '10000',
            shl: '3',
            lhz: '4',
            gjszj: '20000',
            price_sum: '10000',
          },
          {
            id: '3',
            name: '铂金',
            kfgh: '是',
            cs: '99%',
            ys: '白',
            jjz: '1231',
            ssjj: '10000',
            shl: '3',
            lhz: '4',
            gjszj: '20000',
            price_sum: '10000',
          },
        ],
        tableDataPj: [
          {
            id: '1',
            name: '配件1',
            namegjs: '黄金',
            kfgh: '否',
            cs: '99%',
            ys: '黄',
            jjz: '1231',
            gfdj: '234',
            gfzj: '444',
            gjsdj: '10000',
            gjszj: '20000',
            price_sum: '10000',
          },
          {
            id: '2',
            name: '配件2',
            namegjs: '铂金',
            kfgh: '是',
            cs: '99%',
            ys: '白',
            jjz: '1231',
            gjsdj: '10000',
            gjszj: '20000',
            price_sum: '10000',
          },
          {
            id: '3',
            name: '配件3',
            namegjs: '铂金',
            kfgh: '是',
            cs: '99%',
            ys: '白',
            jjz: '1231',
            gjsdj: '10000',
            gjszj: '20000',
            price_sum: '10000',
          },
        ],

        fullscreen: false,
      }
    },
    components: {
      'dialog-tools': 'url:../../tools/dialog-tools.vue',
      // 'genjin-jilu': 'url:../data/genjin-jilu.vue',
      'carousel': 'url:./carousel.vue',
      'dialog-add': 'url:./add.vue',
      // 'customer-edit': 'url:./customer-edit.vue',
    },
  }
</script>
